﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using System.Text;
namespace ModernShopping.AppCode.WebUtil
{
    public class ProductMapping
    {
        public int ProductCode { get; set; }
        public string ProductName { get; set; }
        public double Price { get; set; }
        public string MadeIn { get; set; }

        public string ToJson()
        {
            return JsonConvert.SerializeObject(this);
        }
        public override string ToString()
        {
            StringBuilder buider = new StringBuilder();
            buider.Append(ProductCode);
            buider.Append(";");
            buider.Append(ProductName);
            buider.Append(";");
            buider.Append(Price);
            buider.Append(";");
            buider.Append(MadeIn);
            return buider.ToString();
        }
    }
}